package com.emergency.engine.domain;

import com.emergency.base.domain.BaseEntity;
import com.emergency.base.domain.Scenar;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * 时间轴类
 */
@Entity
@Table(name="bus_time_line")
public class TimeLine extends BaseEntity{

	/**想定文件*/
	/**想定*/
	@OneToOne(targetEntity=Scenar.class,fetch= FetchType.EAGER)
	@JoinColumn(name="scenar_id",referencedColumnName="id")
	private Scenar scenar;

	/**开始时间*/
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	private Date startTime;

	/**结束时间*/
	@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
	private Date endTime;

	/**推演状态
	 * 0表示推演中，1表示暂停中，2表示推演结束
	 * */
	private int status;

	/**推演进度，单位为秒*/

	private Long progress;


	/**推演倍数，正常为1秒*/
	private int rate;

	public Scenar getScenar() {
		return scenar;
	}

	public void setScenar(Scenar scenar) {
		this.scenar = scenar;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {	this.endTime = endTime;	}

	public int getStatus() {return status;	}

	public void setStatus(int status) {
		this.status = status;
	}

	public int getRate() {
		return rate;
	}

	public void setRate(int rate) {
		this.rate = rate;
	}

	public Long getProgress() {
		return progress;
	}

	public void setProgress(Long progress) {
		this.progress = progress;
	}

}